package com.example.day0525.news

import androidx.lifecycle.MutableLiveData
import com.example.base.entity.NewsBean
import com.example.base.mvvm.BaseViewModel
import com.example.base.net.ApiService
import dagger.hilt.android.lifecycle.HiltViewModel
import javax.inject.Inject

@HiltViewModel
class NewViewModel @Inject constructor(val apiService: ApiService) :BaseViewModel(){
    val success=MutableLiveData<NewsBean>()
    fun news(){
        httQuest({apiService.getNews()},success::postValue)
    }
}